<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    for (var i = 1000; i <= 9999; i++) {
        var g = i % 10;
        var s = parseInt(i % 100 / 10);
        var b = parseInt(i % 1000 / 100);
        var q = parseInt(i / 1000);
        if (i === g * g * g * g + s * s * s * s + b * b * b * b + q * q * q * q) {
            console.log(i + "是四叶玫瑰数");
        }
    }
</script>